package com.dabai.simpleconnection_udp.adapter;

import androidx.annotation.NonNull;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.viewholder.BaseViewHolder;
import com.dabai.simpleconnection_udp.R;
import com.dabai.simpleconnection_udp.bean.UdpCommandModel;

import java.util.ArrayList;

/**
 * Description : Other
 *
 * @author BAI
 */
public class UdpAdapter extends BaseQuickAdapter<UdpCommandModel, BaseViewHolder> {


    public UdpAdapter(ArrayList<UdpCommandModel> smallProgramInfos) {
        super(R.layout.item_udp_command, smallProgramInfos);
    }

    @Override
    protected void convert(@NonNull BaseViewHolder baseViewHolder, UdpCommandModel udpCommandModel) {


        baseViewHolder.setText(R.id.textView1,udpCommandModel.getName());
        baseViewHolder.setText(R.id.textView2,udpCommandModel.getContent());
        baseViewHolder.setText(R.id.textView3,udpCommandModel.getIp());
        baseViewHolder.setText(R.id.textView4,""+udpCommandModel.getPort());

    }
}